import { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  // Home
  {
    path: '/',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'IndexPage',
        component: () => import('src/pages/IndexPage.vue')
      }
    ],
  },
  {
    path: '/Home',
    redirect: { name: 'IndexPage' }
  },
  {
    path: '/apaQTL',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'apaQTLPage',
        component: () => import('src/pages/apaQTLPage.vue')
      }
    ],
  },
  {
    path: '/eQTL',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'eQTLPage',
        component: () => import('src/pages/eQTLPage.vue')
      }
    ],
  },
  {
    path: '/lnceQTL',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'lnceQTLPage',
        component: () => import('src/pages/lnceQTLPage.vue')
      }
    ],
  },
  {
    path: '/mireQTL',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'mireQTLPage',
        component: () => import('src/pages/mireQTLPage.vue')
      }
    ],
  },
  {
    path: '/meQTL',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'meQTLPage',
        component: () => import('src/pages/meQTLPage.vue')
      }
    ],
  },
  {
    path: '/sQTL',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'sQTLPage',
        component: () => import('src/pages/sQTLPage.vue')
      }
    ],
  },
  {
    path: '/aggregation',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'ResultsPage',
        component: () => import('pages/ResultsPage.vue')
      }
    ],
  },

  // 生存相关QTL, 表单加结果表格
  {
    path: '/survival',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'SurvivalPage',
        component: () => import('pages/SurvivalPage.vue')
      }
    ],
  },
  // GWAS相关的QTL, 表单加表格
  {
    path: '/GWAS',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'GWASPage',
        component: () => import('pages/GWASPage.vue')
      }
    ],
  },
  //TODO 下载页面
  {
    path: '/Download',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'DownloadPage',
        component: () => import('src/pages/DownloadPage.vue')
      }
    ],
  },
  //TODO 帮助页面
  {
    path: '/Help',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'HelpPage',
        component: () => import('pages/HelpPage.vue')
      }
    ],
  },
  // 404
  {
    path: '/:catchAll(.*)*',
    name: 'error',
    component: () => import('pages/ErrorNotFound.vue'),
  },
];

export default routes;
